#ifndef TIMETHREAD_H
#define TIMETHREAD_H
#include "Publicstate.h"
#include <qglobal.h>
#include <QObject>
#include <QTimer>
#include <QObject>
#include <QThread>
#include <QDebug>
#include "../OperationManager/operationManager.h"
#include "../OperationManager/operation_linux.h"
#include "../OperationManager/operation_windows.h"
class timethread : public QObject
{
    Q_OBJECT
public:
    explicit timethread(QObject *parent = nullptr);
    void beginToWork();//线程处理函数, 也就是实际开启的线程
 private:
       bool MySystemShutDown();
       bool MyScreenShutDown(bool);
       atime_t atime;
       c_type myshut;
       uint nowtime_t=0;
       uint endtime_t=0; //结束时间的时间戳
       uint sreentime_t=0;
       QDateTime nowtime;
       QTimer * t_time;

       OpeartionMangaer *m_operationworker;
signals:
     void time_Signal(atime_t);
private slots:
      void shotdown(c_type);

      void ct_time();  //子线程信号触发的主线程中的槽函数



};

#endif // TIMETHREAD_H
